home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 14115 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.3 KB

  1. Path: news.primenet.com!not-for-mail
  2. From: bri@primenet.com (Brian Gregory)
  3. Newsgroups: comp.lang.c++
  4. Subject: Possible MFC bugs.. Memory leak problems
  5. Date: 28 Mar 1996 11:04:02 -0700
  6. Organization: Primenet Services for the Internet
  7. Sender: root@primenet.com
  8. Message-ID: <4jekai$4r6@nnrp1.news.primenet.com>
  9. X-Posted-By: ip058.phx.primenet.com
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. I've created an application Framework in 'C++'. This framework simply
  13. serves as a GUI interface (status info only) for a small 'C' utility.
  14. Within the application's InitInstance call, I create a dialog, using
  15. DoModal(), and within the dialog's OnShowWindow() call the extern 'C'
  16. function. I return false from the InitInstance to assure program
  17. termination.
  18.  
  19. My Problems/Questions/Possible Bugs are:
  20. 1) In Appinit.CPP, line #190, the string created with strdup() does
  21. not seem to be deallocated.
  22.  
  23. 2) In Appinit.CPP, line #198, the string created with strdup() does
  24. not seem to be deallocated.
  25.  
  26. 3) In Appinit.CPP, line #204, the string created with strdup() does
  27. not seem to be deallocated.
  28.  
  29. 4) In Appinit.CPP, line #212, the string created with strdup() does
  30. not seem to be deallocated.
  31.  
  32. 5) In AfxMem.CPP, line #321, the memory allocated with the malloc()
  33. does not seem to be deallocated.
  34.  
  35. 6) In Auxdata.CPP, line #128, the pen created using CreatePen does not
  36. seem to ever have a DeleteObject called on it.
  37.  
  38. 7) In Auxdata.CPP, line #129, the pen created using CreatePen does not
  39. seem to ever have a DeleteObject called on it.
  40.  
  41. 8) In Auxdata.CPP, line #130, the pen created using CreatePen does not
  42. seem to ever have a DeleteObject called on it.
  43.  
  44. Please note the following:
  45. - I am using VC++ 1.52 on a Win3.1 machine
  46. - None of the above functionality is directly called by my app.
  47. - These leaks were found with Boundschecker software, and are
  48. perfectly valid leaks.
  49. - The program displays no other memory problems, and appears to work
  50. correctly, shutting down correctly.
  51.  
  52. If this is a programming error, please indicate what I can do to
  53. alleviate (or at least get a clue on where to look for) the errors I
  54. could be inducing. 
  55.  
  56. If this is an MFC error, please let me know what I can do to possibly
  57. bypass the problems - as I don't like shipping with problems like
  58. this.
  59.  
  60. Thanks in advance,
  61.  
  62. Brian Gregory
  63.  
  64. bri@primenet.com
  65. http://www.primenet.com/~bri/index.html
  66.  
  67.  
  68.